package org.jsbd.boss.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jsbd.boss.common.DataGridModel;
import org.jsbd.boss.dao.IMiguReadSearchDAO;
import org.jsbd.boss.domian.MiguReadRetentDoNumStatistics;
import org.jsbd.boss.domian.MiguReadSearchVo;
import org.springframework.stereotype.Repository;

@Repository("miguReadSearchDao")
public class MiguReadSearchDAOImpl extends CrackBaseDao implements IMiguReadSearchDAO {

	@Override
	public Map<String, Object> selectNewTaskExecListPage(DataGridModel page, MiguReadSearchVo miguReadSearchVo) {
		miguReadSearchVo = (miguReadSearchVo == null ? new MiguReadSearchVo() : miguReadSearchVo);
		miguReadSearchVo.setPageInfo(page);
	    Map<String, Object> results = new HashMap<String, Object>();
	    results.put("rows", super.queryForList("qy_migu_read_search.SELECT_NEW_TASK_EXEC_LIST", miguReadSearchVo));
	    results.put("total", super.queryForCount("qy_migu_read_search.SELECT_NEW_TASK_EXEC_COUNT", miguReadSearchVo));
	    return results;
	}
	
	@Override
	public List<MiguReadRetentDoNumStatistics> selectRetentTaskExecList(MiguReadSearchVo miguReadSearchVo) {
	    return super.queryForList("qy_migu_read_search.SELECT_RETENT_TASK_EXEC", miguReadSearchVo);
	}

}
